#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QTreeWidget>
#include <QDir>
#include "treeservice.h"


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

enum NodeType
{
    FOLDER = 0,FILES = 1
};


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_action_triggered();

    void on_action2_triggered();

    void on_action3_triggered();

    void on_action4_triggered();

    void on_action5_triggered();

    void on_action6_triggered();

    void on_action7_triggered();

    void on_action8_triggered();

    void on_action9_triggered();



    void on_action12_triggered();

    void on_action10_toggled(bool arg1);

    void on_action11_toggled(bool arg1);


    void on_dockWidget_topLevelChanged(bool topLevel);

    void on_dockWidget_visibilityChanged(bool visible);

    // 项被激活时触发
    void on_treeWidget_itemActivated(QTreeWidgetItem *item, int column);

    //
    void on_treeWidget_itemChanged(QTreeWidgetItem *item, int column);

    // 当前项变化时触发
    void on_treeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);

private:
    Ui::MainWindow *ui;
    TreeService *ts;

    void initTreeData();
};
#endif // MAINWINDOW_H
